package com.lzx.answer.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author lzx
 * @since 2022-10-05
 */
@Getter
@Setter
@ApiModel(value = "Reply对象", description = "")
public class Reply implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("问题id")
    private Long problemId;

    @ApiModelProperty("回答内容")
    private String content;

    @ApiModelProperty("回答人id")
    private Long userId;

    @ApiModelProperty("回答人昵称")
    private String nickname;

    @ApiModelProperty("回答人头像")
    private String avatar;

    @ApiModelProperty("点赞数")
    private Long likeCount;

    @ApiModelProperty("是否顶置(0表示不顶置，1表示顶置)")
    private Integer isTop;

    @ApiModelProperty("回答时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    //二级回复
    @TableField(exist = false)
    private List<SecondReply> secondReplyList;
}
